//切片文件，一个切片保存着一组数据
import { createSlice } from '@reduxjs/toolkit'
const studentSlice = createSlice({
    name:'student',
    initialState:{
        state:false
    },
    reducers:{
        stuState(state,action){
            state.state = action.payload;
        }
    }
})
//层次不同，导出最好用不同的方式导出
export const {stuState} = studentSlice.actions
export default studentSlice.reducer
